<template>
  <h2 :class="styles['drawer-header']">
    <span>{{ props.title }}</span>
    <CircleClose v-if="!hiddenClose" :class="styles['close-icon']" @click="emit('close')"/>
  </h2>
</template>

<script setup name="DrawerHeader">
import { defineEmits } from 'vue'
import { CircleClose } from '@element-plus/icons-vue'

const props = defineProps({
  title: {
    type: String,
    default: ''
  },
  hiddenClose: {
    type: Boolean,
    default: false
  }
})
const emit = defineEmits(['close'])

</script>

<style module="styles" lang="less" src="./index.less"></style>
